<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:include href="/content/xsl/posts/add.xsl" />
  <xsl:include href="/content/xsl/main.xsl" />

  <xsl:template match="content">
    <xsl:apply-templates select="posts" />
    <input type='hidden' id='content-scripts' value='posts.js' />
  </xsl:template>

  <xsl:template match="posts">
    <div class='wrapper newsreel ui-corner-all'>
      <p class='slogan ui-corner-top {@type}'>
        <span />
        <label id='content-title'>
          <xsl:value-of select="title" />
        </label>
      </p>
      <xsl:if test="//auth and not((@type='news') and (//auth/@mod='0'))">
        <div class='post'>
          <span class='ui-icon ui-icon-pencil' /><a href='#' id='add-post'>Добавить</a>
          <xsl:call-template name="form">
            <xsl:with-param name="action">add</xsl:with-param>
          </xsl:call-template>
        </div>
      </xsl:if>
      <xsl:apply-templates select="post" />
    </div>
  </xsl:template>

</xsl:stylesheet>
